//package com.mobile.web.config.datasource;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.mybatis.spring.SqlSessionFactoryBean;
//import org.mybatis.spring.SqlSessionTemplate;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
//
//import javax.sql.DataSource;
//
//@Configuration
//@MapperScan(basePackages = {"com.mobile.service.daoSqlservershkc"}, sqlSessionFactoryRef = "sqlSessionFactoryDb3")
//public class SqlservershkcConfig {
//    @Autowired
//    @Qualifier("db3")
//    private DataSource dataSourceDb3;
//
//    @Bean
//    public SqlSessionFactory sqlSessionFactoryDb3() throws Exception {
//        SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
//        factoryBean.setDataSource(dataSourceDb3);
//        factoryBean.setConfigLocation(new PathMatchingResourcePatternResolver().getResource("classpath:mybatis/mybatis-config.xml"));
//        factoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/sqlservershkc/*Mapper.xml"));
//        return factoryBean.getObject();
//    }
//
//    @Bean(name = "sqlSessionTemplate3")
//    public SqlSessionTemplate sqlSessionTemplateDb3() throws Exception {
//        return new SqlSessionTemplate(sqlSessionFactoryDb3());
//    }
//
//}
